home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cmln1085.arc / P5.PAS < prev    next >
Pascal/Delphi Source File  |  1986-02-27  |  2KB  |  42 lines

  1. program p5;   {color index array tester}
  2.          {This is an interesting program!  The DEC Rainbow documentation
  3.           indicates that the cellarray feature is not implemented in the
  4.           currently distributed drivers.  However, it seems to work nicely
  5.           using the medium and high resolution color monitor drivers.
  6.           Will miracles never cease!  DEC has given us something in
  7.           addition to some rather poor documentation on GSX. }
  8. const nsize = 8;     maxrow =  50;  maxcol =  50;
  9.  
  10. type cia = array[1..maxrow, 1..maxcol] of integer; {color index array type}
  11.      pointlist = array[1..nsize] of integer;
  12.  
  13. var  j: ^integer;
  14.     i,k,a,b,c,d : integer;
  15.     points : pointlist;
  16.         st : string[255];
  17.         colors : cia;
  18.       rows, cols : integer;
  19.  
  20. {$iB:GSXWORK.INC}
  21. {$iB:GSXFILL.INC}
  22.  
  23. begin
  24.    write('Enter workstation number > ');  readln(i); writeln;
  25.    write('enter pixelop >'); readln(b); writeln;
  26.    openstation(i);
  27.    rows := 50;  cols :=  50;
  28.  
  29.    for i := 1 to rows do
  30.        for k:= 1 to cols do colors[i,k] := (k-1) mod 16;
  31.    cellarray(addr(colors), maxcol, cols, rows, b,    0,   0, 32767,32767);
  32.    readln;
  33.    cellarray(addr(colors), 2, cols, rows, b, 1000,1000, 31767,31767);
  34.    readln;
  35.    cellarray(addr(colors), 3, cols, rows, b, 1000,1000, 31767,31767);
  36.    readln;
  37.    cellarray(addr(colors), 4, cols, rows, b, 1000,1000, 31767,31767);
  38.    readln;
  39.    clearstation;
  40.    closestation
  41. end.
  42.